package com.ykg.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 类(接口)：
 * Created on 2021/6/23 10:14.
 * Author: zetong
 * Description:
 */
public class CreateIdUtil {

    public String CreatId(){
        Date date = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
        String Id = sdf.format(date);
        return Id;
    }//按时间生成14位ID

    public String creatContractId(){
        String contractId = "CO"+CreatId();
        return contractId;
    }//生成16位合同ID

    public String creatEntrustId(){
        String contractId = "EN"+CreatId();
        return contractId;
    }//生成16位委托单ID

    public String creatListChargeId(){
        String contractId = "LC"+CreatId();
        return contractId;
    }//生成16位卸货清单ID

    public String creatNoticeLetterId(){
        String contractId = "NL"+CreatId();
        return contractId;
    }//生成16位通知单ID
}
